Skip to content

Fail the site deployment when the site does not take it - #64

Merged
marcosqlbi merged 1 commit into
mainfrom
fix/verify-published-site
Aug 23, 2026
Merged

Fail the site deployment when the site does not take it#64
marcosqlbi merged 1 commit into
mainfrom
fix/verify-published-site

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

For 1.0.0 the release-triggered site deployment was green from end to end — it waited for
the release to appear in the API, wrote stable.json as 1.0.0, uploaded the artifact, and
deployed it; GitHub recorded the deployment as successful and marked the previous one
inactive — and whiteboard.sqlbi.com kept serving the deployment from twenty minutes
earlier. The download page offered 0.9.5 with every check green. Re-running the workflow
published identical bytes and they were live on the first request.

I confirmed the artifact rather than inferring it: the one that run deployed contains
"version": "1.0.0". Nothing on our side was wrong, and nothing upstream of the site can
report that it did not take.

So the workflow now reads the manifests back from the live domain after deploying, and
fails if they are not the ones it just wrote.

Two design points worth stating, because both are easy to get backwards:

  • It compares against the files the deployment just wrote, not against the newest
    release. A pre-release deployment leaves stable.json untouched, which is correct, and
    a check written against the newest release would fail on every pre-release.
  • The window is deliberately generous — five minutes, polling every fifteen. Slow
    propagation and a stuck deployment are indistinguishable at first, and only one of them
    justifies a red run during a release. Today's re-run was live with Age: 0 on the first
    fetch, so there is a lot of headroom.

The check is read-only and cannot repair a deployment. That is intentional: the remedy is
Run workflow, which republishes the same files, and that has been enough every time.

scripts/verify-published-site.ps1 also runs by hand against any folder holding a CNAME
and the manifests, which is how I tested it — matching manifests pass, a manifest ahead of
the site fails with the remedy named, no manifests skips cleanly, and a missing CNAME
gives a clear error.

What this does not cover is a run that never starts. If the github-pages environment
loses its v* tag rule, the release-triggered run is rejected in seconds and no step of
ours executes. That failure is at least visible in Actions as a rejected run. Catching it
would need a scheduled watchdog, which we decided against for now.

🤖 Generated with Claude Code

A GitHub Pages deployment can report success, be recorded as the active
deployment, and still leave the site serving the previous one. That is what
happened to 1.0.0: the release-triggered run waited for the release to appear,
wrote the correct manifests, uploaded them, and deployed them, all green, and
the download page went on offering 0.9.5 for as long as nobody looked. Re-running
the workflow published the same bytes and they were live on the first request.

Reading the site back is the only place that failure shows, so the workflow now
does it and fails if the manifests it just deployed are not the ones being
served.

It compares against the deployed files rather than against the newest release,
because a pre-release deployment leaves stable.json untouched and a check
written the other way would fail on every one of them. The window before it
gives up is generous: slow propagation and a stuck deployment look identical at
first, and only one is worth interrupting a release for.

The check cannot repair anything, and is not meant to. The remedy stays Run
workflow, which republishes the same files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@marcosqlbi
marcosqlbi merged commit d4dce4a into main Aug 23, 2026
4 checks passed
@marcosqlbi
marcosqlbi deleted the fix/verify-published-site branch August 23, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant